﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MTGenome.Core.Import;

namespace MTGenome.UnitTests
{
    [TestClass]
    public class UrlBuilderTest
    {
        [TestMethod]
        public void Search_Spoiler_Text()
        {
            var builder = new UrlBuilder();

            string url = builder
                .Search()
                .Output(OutputType.Spoiler)
                .Method(MethodType.Text)
                .ToString();

            Assert.AreEqual("http://gatherer.wizards.com/Pages/Search/Default.aspx?&output=spoiler&method=text", url);
        }

        [TestMethod]
        public void Details_MultiverseID()
        {
            var builder = new UrlBuilder();

            string url = builder
                .Details()
                .MultiverseID(226589)
                .ToString();

            Assert.AreEqual("http://gatherer.wizards.com/Pages/Card/Details.aspx?&multiverseid=226589", url);
        }
    }
}
